package cn.dglydrpy.study.common.exception;

public enum EmBusinessError implements ICommonError {
    //10000通用错误类型
    PARAMETER_VALIDATION_ERROR(10001,"参数不合法"),
    UNKNOWN_ERROR(10002,"未知错误")
    //20000开头为xxx相关错误定义

    //30000开头为xxx相关错误定义

    ;

    private int errCode;
    private String errMsg;

    private EmBusinessError(int errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    @Override
    public int getErrCode() {
        return this.errCode;
    }

    @Override
    public String getErrMsg() {
        return this.errMsg;
    }

    @Override
    public ICommonError setErrMsg(String errMsg) {
        this.errMsg = errMsg;
        return this;
    }
}
